package  
{
	import org.flixel.*;

	public class Skeleton extends GameObject {
		[Embed(source = "../data/skeleton.png")] private var ImgSkeleton:Class;

		protected var bone: Bone;

		public function Skeleton(X: Number, Y: Number, Z: Number = 0) {
			super(X, Y, Z);
			loadGraphic(ImgSkeleton, false, true);
			offset.x = 4;
			offset.y = 1;
			width = 8;
			height = 14;
			
			bone = new Bone(this)
			facing = LEFT;
		}
		
		public function getBone():Bone { return bone; }

		override public function update(): void {
			super.update();
		    bone.shoot(angle);
		}
	}
}